IOKit header assert.h gone? [answered]

Posted by Julian Kessel on Stack Overflow See other posts from Stack Overflow or by Julian Kessel
Published on 2010-03-22T18:09:27Z Indexed on 2010/03/23 19:13 UTC
Read the original article Hit count: 345

Filed under:
|
|
|
|

I want to get the hardware address of my mac's ethernet card. In all samples I saw in include on IOKit/assert.h . Which doesn't seem to exist on my system. GCC throws an error saying he doesn't know the type IOEthernetAddress. Is assert.h necessary for my task? It would be great if someone coud give me a working sample. [edit] here's my code, think this will help understanding the problem:

#include <IOKit/assert.h>
#include <IOKit/network/IOEthernetController.h>
#include <IOKit/network/IOEthernetInterface.h>

int main(){
    IOEthernetAddress addr;
    getHardwareAddress(&addr);
    printf("%x", addr);
    return 0;
}

© Stack Overflow or respective owner

Related posts about iokit

Related posts about osx